<style>
    h2 a{margin-right: 15px;color: darkcyan;text-decoration: none}
    h2 a:hover{color: crimson;text-decoration: underline}
    h2 a:last-child{margin-right: 0}
    .current{color: #f8ab0a}
    .loginInfo{text-align: right;font-size: 14px;font-weight: normal;color: #5c874b;display: block;margin-left: 20px}
    .title1{display: block}
    .title2{display: block}
    .logout{color: brown}
    a{text-decoration: none;color: #f9a525
    }
    a:hover{text-decoration: underline}
    .nav{margin-bottom: 35px;}
</style>
<h1><a href="index.php">我最喜爱的汽车在线投票</a></h1>
<h2 class="loginInfo"><?php if($_SESSION['loggedUsername']){ ?>当前登录者：<?php echo $_SESSION['loggedUsername'];?> <a href="modify.php">资料修改</a> <a href="logout.php" class="logout">注销登录</a><?php }else{?><a href="register.php">用户注册</a> <a href="login.php">用户登录</a><?php }?> <a href="admin.php">后台管理</a> </h2>